Skip to content

Conversation

@summerDev96
Copy link
Collaborator

📦 Pull Request

📝 요약(Summary)

  • 로그인/회원가입 화면에서 로그인 API 호출 후, useUserStore의 setUser을 사용하여 전역 데이터를 저장하는 부분을 추가

💬 공유사항 to 리뷰어

  • 유진님이 만드신 전역 스토어를 연결하는 부분만 추가되었습니다

🗂️ 관련 이슈

📸 스크린샷

✅ 체크리스트

  • 빌드 및 테스트 통과
  • ESLint/Prettier 검사 통과

@summerDev96 summerDev96 requested review from 626-ju and youdaeng2 July 30, 2025 05:51
@vercel
Copy link

vercel bot commented Jul 30, 2025

@summerDev96 is attempting to deploy a commit to the 626-ju's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@youdaeng2 youdaeng2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

미리 승인해두겠습니다! 감사합니다~

passwordSchema,
passwordConfirmationSchema,
} from '@/lib/form/schemas';
import { useUserStore } from '@/stores/userStore';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

죄송해요 제가 예시를 잘못 적어놨네요 ㅋㅋ ㅠㅠ
hook 파일에 useUser라는 훅 파일이 있습니다 내부 한번 확인해보시고 아래처럼 수정해주시면 감사하겠습니다!

import { getUser } from '@/api/user';
import { useUser } from '@/hooks/useUser';

export const useLoginSuccess = () => {
  const { setUser } = useUser();

  const handleLoginSuccess = async () => {
    try {
      const user = await getUser();
      setUser(user);
    } catch (e) {
      console.warn('유저 정보 불러오기 실패', e);
    }
  };

  return { handleLoginSuccess };
};

@summerDev96 summerDev96 merged commit c88a741 into codeit-part3-7:dev Jul 30, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants